package com.dcivision.dms.bean;

import com.dcivision.framework.GlobalConstant;
import com.dcivision.framework.bean.AbstractBaseObject;

public class DmsDocumentIndexCache extends AbstractBaseObject {
  
  public static final String ACTION_MODE_INSERT = GlobalConstant.OP_MODE_INSERT;
    
  public static final String ACTION_MODE_UPDATE = GlobalConstant.OP_MODE_UPDATE;
  
  public static final String ACTION_MODE_DELETE = GlobalConstant.OP_MODE_DELETE;
  
  public static final String ACTION_MODE_COPY = GlobalConstant.OP_MODE_COPY;
  
  public static final String ACTION_MODE_MOVE = GlobalConstant.OP_MODE_MOVE;
  
  public static final String ACTION_MODE_RESTORE = "RST";
  
  public static final String ACTION_MODE_CHECKIN = "CKI";
  
  /**
   * Need to run lucene immedialy, actionType must equal 0
   */
  public static final String ACTION_TYPE_RUN_IMMEDIATELY      = "RUN_IMM";
  
  public static final String ACTION_TYPE_INSERT_BY_DATABASE   = "INS_DAT";
  
  public static final String ACTION_TYPE_INSERT_BY_PARAM      = "INS_PAR";
  
  
  public static final String ACTION_TYPE_UPDATE_ALL           = "UPD_ALL";
  
  public static final String ACTION_TYPE_UPDATE_STANDARD      = "UPD_STA";
  
  public static final String ACTION_TYPE_UPDATE_UDFINDEX      = "UPD_UDF";
  
  public static final String ACTION_TYPE_UPDATE_NAME          = "UPD_NAM";
  
  public static final String ACTION_TYPE_DELETE_HARD          = "DEL_HAR";
  
  public static final String ACTION_TYPE_DELETE_SOFT          = "DEL_SOF";
  
  private Integer dmsDocumentID = null;
  
  private String actionMode = null;
    
  private String actionType = null;

  private Integer sourceDocumentID = null;
  
  public Integer getSourceDocumentID() {
    return sourceDocumentID;
  }

  public void setSourceDocumentID(Integer sourceDocumentID) {
    this.sourceDocumentID = sourceDocumentID;
  }

  /**
   * Default constuctor.
   */
  public DmsDocumentIndexCache() {
    super();
  }
  
  /**
   * Only construct for delete operation.
   * @param dmsDocumentID
   * @param actionMode
   */
  public DmsDocumentIndexCache(Integer dmsDocumentID, String actionMode) {
    super();
    this.dmsDocumentID = dmsDocumentID;
    this.actionMode = actionMode;
  }
  
  /**
   * Construct with all needed paramter. 
   * @param dmsDocumentID
   * @param actionMode
   * @param actionType
   * @param sourceDocumentID
   */
  public DmsDocumentIndexCache(
      Integer dmsDocumentID, 
      String actionMode, 
      String actionType,
      Integer sourceDocumentID) {
    super();
    this.dmsDocumentID = dmsDocumentID;
    this.actionMode = actionMode;
    this.actionType = actionType;
    this.sourceDocumentID = sourceDocumentID;
  }

  public String getActionMode() {
    return actionMode;
  }

  public void setActionMode(String actionMode) {
    this.actionMode = actionMode;
  }

  public Integer getDmsDocumentID() {
    return dmsDocumentID;
  }

  public void setDmsDocumentID(Integer dmsDocumentID) {
    this.dmsDocumentID = dmsDocumentID;
  }

  public String getActionType() {
    return actionType;
  }
  
  public void setActionType(String actionType) {
    this.actionType = actionType;
  }

}
